package com.andnnl.sort;

import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * Created by chenss on 2020/10/15.
 */
public class SortTest {
    public static void main(String[] args) {
        List<String> list= Arrays.asList("a","c","basdf","basdf2");
//        list.sort((a,b)->-b.compareTo(a));
        list.sort((a,b)->a.startsWith("b")?-1:b.startsWith("b")?-1:a.compareTo(b));
        System.out.println(list);
    }

}
